home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 359 / def / vdicalls.def < prev    next >
Encoding:
Modula Definition  |  1989-01-09  |  5.7 KB  |  175 lines

  1. DEFINITION MODULE VDIcalls;
  2.  
  3. (*
  4.  *  Copyright (c) 1987,1988,1989 by
  5.  *  ana-systems, Foster City, California.
  6.  *  All Rights Reserved.
  7.  *
  8.  *  This software is furnished under a license and may be used and copied
  9.  *  only  in accordance with  the  terms  of  such  license and  with the
  10.  *  inclusion of the above copyright notice.  This software or  any other
  11.  *  copies thereof may not be provided or otherwise made available to any
  12.  *  other  person.   No title to and ownership of the  software is  herby
  13.  *  transferred.
  14.  *
  15.  *  The information in this software is  subject to change without notice
  16.  *  and  should  not be construed as a commitment by ana-systems.   No
  17.  *  warranty is implied or expressed.
  18.  *)
  19.  
  20. EXPORT QUALIFIED VOpnvwk,VClsvwk,VClrwk,VsClip,VrRecfl,VsfColor,
  21.                  VsfInterior,VsfStyle,VBar,VswrMode,
  22.                  VHideC,VShowC,VEnterCur,VExitCur,VHomeCur,
  23.                  VGetPixel,VqColor,VsColor,VgText,VpLine,VslColor;
  24.  
  25. PROCEDURE VOpnvwk(VAR workin:ARRAY OF INTEGER;
  26.                   VAR handle:INTEGER;
  27.                   VAR workout:ARRAY OF INTEGER);
  28. (*
  29.  *  Programer supplies workin and workout arrays, and handle
  30.  *  returned by GrafHandle.  The virtual workstation handle is 
  31.  *  returned in handle and workout is filled with info about the 
  32.  *  device.
  33.  *  Note: GrafHandle returns the physical wkstation handle, which
  34.  *        you should save; VOpnvwk returns the virtual wkstation
  35.  *        handle. The two are differentiated as physHandle and
  36.  *        handle.
  37.  *)
  38.  
  39. PROCEDURE VClsvwk(handle:INTEGER);
  40. (*
  41.  *  Terminate output to virtual workstation.
  42.  *)
  43.  
  44. PROCEDURE VClrwk(handle:INTEGER);
  45. (*
  46.  *  Clear the screen, or clear print buffer and do FF, etc.
  47.  *)
  48.  
  49. PROCEDURE VsClip(handle,clipFlag:INTEGER; VAR clipRect:ARRAY OF INTEGER);
  50. (*
  51.  *  Turn clipping on (clipFlag=1) or off (clipFlag=0).  Must supply
  52.  *  the clipping rectangle as the upper left and lower right
  53.  *  points [x1,y1,x2,y2].
  54.  *)
  55.  
  56. PROCEDURE VrRecfl(handle:INTEGER; VAR rect:ARRAY OF INTEGER);
  57. (*
  58.  *  Draws a filled rectangle [x1,y1,x2,y2].  Fill style is set by
  59.  *  the Vsf_ calls.  VswrMode() and the current clipping rect also
  60.  *  apply.  (Good for painting large areas quickly.)
  61.  *)
  62.  
  63. PROCEDURE VBar(handle:INTEGER; VAR rect:ARRAY OF INTEGER);
  64. (*
  65.  *  Draws a filled rectangle [x1,y1,x2,y2].  Fill style is set by
  66.  *  the Vsf_ calls.  VswrMode() and the current clipping rect also
  67.  *  apply.
  68.  *)
  69.  
  70. PROCEDURE VsfColor(handle,colorIndex:INTEGER):INTEGER;
  71. (*
  72.  *  Set fill color to the VDI 'colorIndex' passed (0=white, the background,
  73.  *  and 1=black, the forground on mono).  colorIndex is the actual color
  74.  *  register used for drawing -- it is NOT the control panel setting or
  75.  *  the very lowest level hardware color register.
  76.  *  Returns the colorIndex that was set.
  77.  *)
  78.  
  79. PROCEDURE VsColor(handle,colorIndex:INTEGER; VAR rgb:ARRAY OF INTEGER);
  80. (*
  81.  *  Set the VDI colorInex (drawing pen) to the color 'rgb' --
  82.  *  does not set the control panel.  rgb is an array of 3 integers
  83.  *  which contains the red, green and blue levels.
  84.  *)
  85.  
  86. PROCEDURE VqColor(handle,colorIndex,flag:INTEGER; VAR rgb:ARRAY OF INTEGER);
  87. (*
  88.  *  Returns the either the actual color of coloIndex (flag=1) or the
  89.  *  last requested setting (by VsColor) of colorIndex (flag=0).
  90.  *)
  91.  
  92. PROCEDURE VslColor(handle,colorIndex:INTEGER):INTEGER;
  93. (*
  94.  *  Set line color to the VDI 'colorIndex' passed (0=white, the background,
  95.  *  and 1=black, the forground on mono).  colorIndex is the actual color
  96.  *  register used for drawing -- it is NOT the control panel setting or
  97.  *  the very lowest level hardware color register.
  98.  *  Returns the colorIndex that was set.
  99.  *)
  100.  
  101. PROCEDURE VGetPixel(handle,x,y:INTEGER; VAR register,colorIndex:INTEGER);
  102. (*
  103.  *  Returns the HARDWARE register number and the VDI colorIndex
  104.  *  number of a specified pixel.
  105.  *)
  106.  
  107. PROCEDURE VsfInterior(handle,style:INTEGER):INTEGER;
  108. (*
  109.  *  Determines the style of fill used by the fill functions.
  110.  *  Returns the style set.
  111.  *)
  112.  
  113. PROCEDURE VsfStyle(handle,index:INTEGER):INTEGER;
  114. (*
  115.  *  If style Pattern or Crosshatch is set by VsfInterior, this call
  116.  *  sets the particular type (index) of Pattern or Crosshatch.  Returns
  117.  *  the index set.
  118.  *)
  119.  
  120. PROCEDURE VswrMode(handle,mode:INTEGER):INTEGER;
  121. (*
  122.  *  Sets the writing and drawing modes:
  123.  *             mode = 1 replace
  124.  *                    2 transparent
  125.  *                    3 XOR
  126.  *                    4 reverse transparent
  127.  *  Returns the mode set.
  128.  *)
  129.  
  130. PROCEDURE VgText(handle,x,y:INTEGER; VAR string:ARRAY OF CHAR);
  131. (*
  132.  *  Print a line of text at pixel (x,y).  Starts at the
  133.  *  baseline of the leftmost character.
  134.  *
  135.  *  Should set VstColor and perhaps others.
  136.  *)
  137.  
  138. PROCEDURE VpLine(handle,numPoints:INTEGER; VAR points:ARRAY OF INTEGER);
  139. (*
  140.  *  Draw a shape defined by the points given in 'points'.
  141.  *  The points array is set up thus: points[0]=x1, points[1]=y1,
  142.  *  points[2]=x2, points[3]=y2, etc. numPoints is the number of
  143.  *  pairs, that is, (x1,y1) is one point.  Two points minimum
  144.  *  for this function.
  145.  *)
  146.  
  147. PROCEDURE VHideC(handle:INTEGER);
  148. (*
  149.  *  Hide the mouse and increment the VDI mouse hide/show counter.
  150.  *)
  151.  
  152. PROCEDURE VShowC(handle,reset:INTEGER);
  153. (*
  154.  *  If 'reset' <> 0, decrement the VDI mouse hide/show counter,
  155.  *  and show the mouse if counter = 0.
  156.  *  If 'reset' = 0, the counter will be set to 0 and the mouse shown.
  157.  *)
  158.  
  159. PROCEDURE VEnterCur(handle:INTEGER);
  160. (*
  161.  *  Clear the screen and turn on the text cursor.
  162.  *)
  163.  
  164. PROCEDURE VExitCur(handle:INTEGER);
  165. (*
  166.  *  Clear the screen and turn off the text cursor.
  167.  *)
  168.  
  169. PROCEDURE VHomeCur(handle:INTEGER);
  170. (*
  171.  *  Move the text cursor to home position.
  172.  *)
  173.  
  174. END VDIcalls.
  175.